#ifndef CONE_DIALOG_H
#define CONE_DIALOG_H

#include <QDialog>
#include <QtGui>
#include "conePrimitive.h"
#include "objectTreeItem.h"

class ConeDialog : public QDialog{
    Q_OBJECT

    public:
        ConeDialog(int, QWidget * = 0);
        ConeDialog(ConePrimitive *, ObjectTreeItem *, QWidget * = 0);
        ~ConeDialog();

    signals:
        void done(Object *);
        void redoOctree(Object *);
        void rotateOctree(Object *, int, int, int);

    private:
        ConePrimitive *cone;
        ObjectTreeItem *item;
        bool onlyRotated, rotated;
        bool onlyChangedColor;
        int id, colorR, colorG, colorB, colorAlpha, rotationX, rotationY, rotationZ;
        double centerX, centerY, centerZ, radius, height;

        QPushButton *colorPushButton;

        void createLayout();
        void setButtonColor();

    private slots:
        void acceptAndCreate();
        void changeColor();
        void changeCenterX(double);
        void changeCenterY(double);
        void changeCenterZ(double);
        void changeRadius(double);
        void changeHeight(double);
        void changeRotationX(int);
        void changeRotationY(int);
        void changeRotationZ(int);
};

#endif
